All Questions
Tagged with code-organizationunit-testing
4 questions
2votes
2answers
259views
Where to put interface files for mocking aka what are best practices for organizing interfaces in a C#/.NET Core project with NSubstitute, Moq etc.?
Question I'm working on a C#/.NET Core project, and I'm looking for guidance on organizing interfaces, especially when it comes to using NSubstitute, Moq or other libraries for mocking, because there ...
4votes
0answers
172views
How to manage success dependency between unit tests [duplicate]
How do you manage the dependency of one unit test on another unit test succeeding? So, supposed I have a class and this class has say 5 methods. I create like 2 dozen unit tests (test methods) for ...
2votes
2answers
1kviews
TDD workflow for (implementation specific) edge cases
When developing features with TDD, I create a test for each combination of feature and case. So, one test for creating user successfully, one for validation errors, and one for database errors. I don'...
8votes
1answer
2kviews
Why do we write our specs in different files from our source?
The D Programming Language supports writing unit tests inline with source. There's a Ruby gem called test_inline that lets you write specs in the same file as your code. Why is it generally ...